feat(18): adopt the shared CLI helpers in screen.py - #25
Merged
Conversation
Frees -d by dropping it from --descriptor, which lets screen.py take
rdkit_utils.add_common_molecule_io_args() like the other seven rdkit Jobs.
The manifest passes --descriptor long-form, so it needs no change.
screen.py's --delimiter defaulted to '\t' where the shared group defaults to
None, and the manifest passes --delimiter only when the user sets it. Left
alone, a run with --write-header and no --delimiter would have reached
delimiter.join(headers) with None. parser.set_defaults(delimiter='\t')
preserves the existing default exactly.
ProgressReporter is not used here: this Job's progress message carries a hit
count ("Processed N records, M hits") that report() does not emit, so the
inline loop stays. --interval still comes from add_reporting_args().
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #24, which migrated the other seven rdkit Jobs but left
screen.pyout because of a short-flag collision. Per the decision on that PR,
-disdropped from
--descriptorandscreen.pynow takes the shared group.Summary
--descriptorloses its-dshort form, freeing-dfor the group's--delimiter. The manifest passes--descriptorlong-form(
data-manager/rdkit.yaml:971), so it needs no change. The in-file usageexample was updated too.
rdkit_utils.add_common_molecule_io_args(parser, output_required=True)and
add_reporting_args(parser), replacing 9 hand-typed options.Net −15/+10 lines.
-dnow means--delimiter, silentlyThis is the cost of the decision and worth being explicit about.
-dstillparses — it just binds to a different option:
So an existing script or habit passing
-d <descriptor>does not error; itsilently sets a nonsense delimiter and falls back to the default descriptor. The
Job manifest is unaffected, but anyone invoking
screen.pydirectly should know.If that trade is unwelcome, the alternative remains giving the helper a knob to
omit
-d.A latent crash this would have introduced
screen.py's--delimiterdefaulted to'\t'; the shared group defaults toNone. The manifest passes--delimiteronly conditionally(
{% if separatorInputs is defined %}) while--write-headeris separatelyconditional — so a real invocation with
headerOutputsset andseparatorInputsunset would have reached:parser.set_defaults(delimiter='\t')after the helper call preserves theexisting default exactly. Verified: with no
--delimiter, both old and newparse to
'\t'.ProgressReporteris not used hereThis Job's progress message carries a hit count —
"Processed {} records, {} hits"— whichreport()does not emit. Swapping itin would have quietly dropped that. The inline loop stays;
--intervalstillcomes from
add_reporting_args().Verification
main(queries file, tab, id-column, write-header, threshold, interval)mainid_column'1'→1,mol_column0→None, newomit_fieldskey--delimiterdefault with--write-header'\t'on both — crash path closedOne scenario fails on both old and new:
--queries-filewith--write-headerand no--queries-delimiterraisesIndexErrorinside thequery reader. Pre-existing and unrelated to this change.
jotewas not run — needs theinformaticsmatters/vs-prepimage rebuilt.🤖 Generated with Claude Code